package com.xu.cloud.sample.api.apis;

import com.xu.cloud.common.advice.annotation.RespEncrypt;
import com.xu.cloud.common.api.ApiVersion;
import com.xu.cloud.common.api.XuApi;
import com.xu.cloud.common.api.XuApiMethod;
import com.xu.cloud.common.constant.HttpConstant;
import com.xu.cloud.sample.api.dto.XuApiTestReq;
import com.xu.cloud.sample.api.dto.XuApiTestResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;

/**
 * demo test api
 *
 * @author xuguan
 * @since 2025/1/20
 */
@Api(tags = "XuApi测试接口")
@ApiVersion(version = HttpConstant.API_VERSION_V1)
@XuApi(path = "/api/" + HttpConstant.API_VERSION_PLACEHOLDER)
@FeignClient(name = "xu-cloud-sample-api", url = "http://localhost:8080", path = "/api/v1")
@Validated
public interface DemoTestXuApi {

    @ApiOperation(value = "XU0001测试")
    @XuApiMethod(apiCode = "XU0001", path = "/apiTest", apiDesc = "XuApi测试方法", processorBeanName = "xuApiTestProcessor")
    XuApiTestResp apiTest(@Valid XuApiTestReq request);
}

